package com.minube.flights.client;

import java.util.Date;

import com.minube.flights.data.FlightBoard;
import com.minube.flights.util.FlightException;

public abstract class AbstractFlightReader implements IFlightReader {

	protected Date departureDate;

	protected String destinationAirport;

	protected FlightBoard fb;

	protected Date returnDate;

	protected String sourceAirport;

	public AbstractFlightReader(String sourceIATA, String destinationIATA,
			Date departureDate, Date returnDate) {
		
		this.destinationAirport = destinationIATA;
		this.sourceAirport = sourceIATA;

		this.departureDate = departureDate;
		this.returnDate = returnDate;
	}

	public Date getDepartureDate() {
		return departureDate;
	}
	
	public String getDestinationAirport() {
		return destinationAirport;
	}

	public FlightBoard getFlightBoard() {
		return this.fb;
	}
	
	public Date getReturnDate() {
		return returnDate;
	}
	
	public String getSourceAirport () {
		return sourceAirport;
	}
	
	
	public abstract void launchQuery() throws FlightException;
	
	public abstract void process() throws FlightException;

	
	public void setDepartureDate(Date date) {
		this.departureDate = date;
	}

	public void setDestinationAirport(String iata) {
		this.destinationAirport = iata;
	}

	public void setFlightBoard(FlightBoard fb) {
		this.fb = fb;
	}
	
	public void setReturnDate(Date date) {
		this.returnDate = date;
	}

	public void setSourceAirport(String iata) {
		this.sourceAirport = iata;
	}
}
